package com.bdqn.ch03.SZ.sz3.cglib;


import org.apache.log4j.Logger;

/**
 * DynamicProxyFactoryTest
 *
 * cglib 动态代理只能针对接口代理，所以目标对象必须通过抽象主题接口实现
 *
 * @aurhor Administrator  whs
 * @since 2024/7/8
 */
public class DynamicProxyFactoryTest {

    private static Logger logger = Logger.getLogger(DynamicProxyFactoryTest.class);


    public static void main(String[] args) {


        Message cglib = DynamicProxyFactory.create(Message.class);

        String result = cglib.getMessages();

        logger.debug(result);
    }

    /**
     * 2024-07-08 10:56:40 [DEBUG] 今天天气真好，天空很蔚蓝 com.bdqn.ch03.SZ.sz3.cglib.DynamicProxy.weather(DynamicProxy.java:45)
     * 2024-07-08 10:56:40 [DEBUG] 就是热的有点遭不住了 com.bdqn.ch03.SZ.sz3.cglib.DynamicProxy.weather(DynamicProxy.java:46)
     * 2024-07-08 10:56:40 [DEBUG] 现在是2024/7/8 10:49 忘记写接口实现类报错找了一万年了... com.bdqn.ch03.SZ.sz3.cglib.Message.getMessages(Message.java:23)
     * 2024-07-08 10:56:40 [DEBUG] 今天心情蛮好~ com.bdqn.ch03.SZ.sz3.cglib.DynamicProxy.mood(DynamicProxy.java:53)
     * 2024-07-08 10:56:40 [DEBUG] 又是开心的一天~ com.bdqn.ch03.SZ.sz3.cglib.DynamicProxy.mood(DynamicProxy.java:54)
     * 2024-07-08 10:56:40 [DEBUG] 使用cglib 动态代理方式实现查看 debug 的信息 ~~
     *  现在心情很 emo 🤮🤮🤮  com.bdqn.ch03.SZ.sz3.cglib.DynamicProxyFactoryTest.main(DynamicProxyFactoryTest.java:26)
     */

}
